package com.youyou.service;

import com.youyou.dao.StudentDao;
import com.youyou.entity.StudentEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentDao studentDao;
    public List<StudentEntity> studentList() {
        return studentDao.studentList();
    }

    public StudentEntity getStudentById(Integer id) {

        return studentDao.getStudentById(id);
    }

    public boolean insertStudent(StudentEntity studentEntity) {

        return studentDao.insertStudent(studentEntity);
    }

    public boolean updateStudent(StudentEntity studentEntity) {
        studentDao.updateStudent(studentEntity);
        return true;
    }

    public boolean delStdentById(Integer id) {
        studentDao.delStdentById(id);
        return true;
    }
}
